diff options
| author | joonhoekim <26rote@gmail.com> | 2025-12-08 14:19:37 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-12-08 14:19:37 +0900 |
| commit | 2ac7deb8494cf4123f0cff3321860585a44f157c (patch) | |
| tree | 789b6980c8f863a0f675fad38c4a17d91ba28bf3 /app/[lng]/evcp/(evcp)/layout.tsx | |
| parent | 71c0ba1f01b98770ec2c60cdb935ffb36c1830a9 (diff) | |
| parent | e37cce51ccfa3dcb91904b2492df3a29970fadf7 (diff) | |
Merge remote-tracking branch 'origin/sec-patch' into table-v2
Diffstat (limited to 'app/[lng]/evcp/(evcp)/layout.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/layout.tsx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/[lng]/evcp/(evcp)/layout.tsx b/app/[lng]/evcp/(evcp)/layout.tsx index 7fe7f3e7..093d9301 100644 --- a/app/[lng]/evcp/(evcp)/layout.tsx +++ b/app/[lng]/evcp/(evcp)/layout.tsx @@ -1,5 +1,5 @@ import { ReactNode } from 'react'; -import { Header } from '@/components/layout/Header'; +import { HeaderV2 } from '@/components/layout/HeaderV2'; import { SiteFooter } from '@/components/layout/Footer'; import { getServerSession } from "next-auth"; import { authOptions } from "@/app/api/auth/[...nextauth]/route"; @@ -12,12 +12,16 @@ export default async function EvcpLayout({ children }: { children: ReactNode }) let isAuthorized = true; let authMessage = ""; - // Only check permission if user is logged in - if (session?.user?.id) { + // Skip permission check if environment variable is set + const skipPermissionCheck = process.env.SKIP_ORACLE_PERMISSION_CHECK === 'true'; + + // Only check permission if user is logged in and check is not skipped + if (session?.user?.id && !skipPermissionCheck) { try { const result = await verifyNonsapPermission( parseInt(session.user.id), - ['SEARCH'] + // ['SEARCH'] + [] // 아무런 실제 권한이 없어도, 등록된 상태라면 화면에 'SEARCH' 권한이 있는것처럼 동작하게 해달라고 함. (김희은 프로) ); isAuthorized = result.authorized; authMessage = result.message || ""; @@ -33,8 +37,10 @@ export default async function EvcpLayout({ children }: { children: ReactNode }) return ( <div className="relative flex min-h-svh flex-col bg-background"> {/* <div className="relative flex min-h-svh flex-col bg-slate-100 "> */} - <Header /> - <PermissionChecker authorized={isAuthorized} message={authMessage} /> + <HeaderV2 /> + {!skipPermissionCheck && ( + <PermissionChecker authorized={isAuthorized} message={authMessage} /> + )} <main className="flex flex-1 flex-col"> <div className='container-wrapper'> {children} |
